<?php


namespace app\http\middleware;


use app\admin\model\Duty;
use think\Exception;

class permission
{
    public function handle($request, \Closure $next)
    {
        //权限
        //验证通过
        try {
            $user = $request->_user;
//            $res = Duty::Authorization($user["staff_no"]);
//            if($res){
//                return failedJson($res);
//            }
            return $next($request);
        }catch (\Exception $e){
            return failedJson("内部错误", 1, $e->getMessage());
        }
    }
}